'use strict';
var even_asc_odd_desc = function(collection){
    var arr=[];
    var abb=[];
    var ac=[];
    for(let i of collection){
        if(i%2==0){
          arr.push(i);
        }
        else{
            abb.push(i);   
        }
    }
    console.log(arr);
    console.log(abb);
    function sortNumber(a,b){
        return a-b;
    }
    var ab=arr.sort(sortNumber);
    ac.push(ab);
    console.log(ac);
    function sortNumber1(a,b){
        return b-a;
    }
    var d= abb.sort(sortNumber1);
    ac.push(d);
   console.log(ac);
    let a=(ac+'');
    console.log( a);
    let as=a.split(',');
    console.log( as);
    let s1=as.map(function(x){
               return Number(x);
    });
    console.log( s1);
    return s1;
     
};
module.exports = even_asc_odd_desc;

